@{
    Layout=null;
}
@using MvcDemo.Models;
@model Product;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <div>
            <table>
                @if(Model==null){
                    <tr hidden>
                    <td>id</td>
                    <td><input type="text" name="id"></td>
                </tr>
                <tr>
                    <td>商品名称：</td>
                    <td><input type="text" name="name"></td>
                </tr>
                <tr>
                    <td>供应商名称：</td>
                    <td><input type="text" name="Cname"></td>
                </tr>
                <tr>
                    <td>价格：</td>
                    <td><input type="text" name="price"></td>
                </tr>
                <tr>
                    <td>库存数量：</td>
                    <td><input type="text" name="num"></td>
                </tr>
                <tr>
                    <td>备注：</td>
                    <td><input type="text" name="Remarks"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" id="save"></td>
                    <td><input type="button" value="取消" id="quxiao"></td>
                </tr>
                }else{<tr hidden>
                    <td>id</td>
                    <td><input type="text" name="id" value="@Model.id"></td>
                </tr>
                <tr>
                    <td>商品名称：</td>
                    <td><input type="text" name="name" value="@Model.ProductName"></td>
                </tr>
                <tr>
                    <td>供应商名称：</td>
                    <td><input type="text" name="Cname" value="@Model.Supplier"></td>
                </tr>
                <tr>
                    <td>价格：</td>
                    <td><input type="text" name="price" value="@Model.Price"></td>
                </tr>
                <tr>
                    <td>库存数量：</td>
                    <td><input type="text" name="num" value="@Model.Stock"></td>
                </tr>
                <tr>
                    <td>备注：</td>
                    <td><input type="text" name="Remarks" value="@Model.Remarks"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" id="save"></td>
                    <td><input type="button" value="取消" id="quxiao"></td>
                </tr>}
                
            </table>
        </div>
    </div>
    <script src="~/js/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>
</html>